package com.huawei.appmarket.service.distribution.minidetail;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.huawei.appmarket.R;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailHeadBean;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailHiddenBean;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailScreenBean;
import com.huawei.appmarket.service.appdetail.view.card.DetailScreenCard;
import com.huawei.appmarket.service.distribution.minidetail.MiniDetailFragmentProtocol.Request;
import java.util.ArrayList;
import java.util.List;
import o.dgm;

public class DefaultMiniDetailFragment extends MiniDetailAbstractFragment {
    public static MiniDetailFragmentProtocol ˏ(Activity activity, String str, String str2) {
        DetailHiddenBean detailHiddenBean = new DetailHiddenBean();
        detailHiddenBean.ʻॱ(str2);
        detailHiddenBean.ˏˎ(str);
        return ˏ(activity, detailHiddenBean);
    }

    public static MiniDetailFragmentProtocol ˎ(Activity activity, String str, String str2) {
        DetailHiddenBean detailHiddenBean = new DetailHiddenBean();
        detailHiddenBean.ʻॱ(str2);
        detailHiddenBean.ˉ(str);
        return ˏ(activity, detailHiddenBean);
    }

    private static MiniDetailFragmentProtocol ˏ(Activity activity, DetailHiddenBean detailHiddenBean) {
        MiniDetailFragmentProtocol miniDetailFragmentProtocol = new MiniDetailFragmentProtocol();
        Request request = new Request();
        DetailHeadBean detailHeadBean = new DetailHeadBean();
        detailHeadBean.ˋ(activity.getString(R.string.str_loading_prompt));
        request.ˊ(detailHeadBean);
        request.ˋ(detailHiddenBean, dgm.ˎ(activity));
        miniDetailFragmentProtocol.ˏ(request);
        return miniDetailFragmentProtocol;
    }

    protected void ˎ(Bundle bundle) {
        ॱˋ(false);
    }

    @Nullable
    public View ˋ(@NonNull LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, @Nullable Bundle bundle) {
        View ˋ = super.ˋ(layoutInflater, viewGroup, bundle);
        if (ˋ != null) {
            ˋ.setBackgroundColor(ᐝॱ().getColor(R.color.emui_white));
        }
        return ˋ;
    }

    protected void ˏ(@NonNull LayoutInflater layoutInflater, @Nullable Bundle bundle, ViewGroup viewGroup) {
        LinearLayout linearLayout = (LinearLayout) viewGroup.findViewById(R.id.mini_detail_container);
        DetailScreenCard detailScreenCard = new DetailScreenCard();
        detailScreenCard.ˏ(this);
        View ˊ = detailScreenCard.ˊ(ˋˊ(), linearLayout, bundle);
        List arrayList = new ArrayList();
        DetailScreenBean detailScreenBean = new DetailScreenBean();
        List arrayList2 = new ArrayList();
        arrayList2.add("screen_place_holder_one");
        arrayList2.add("screen_place_holder_two");
        detailScreenBean.ˎ((ArrayList) arrayList2);
        detailScreenBean.ˎ(arrayList2);
        arrayList.add(detailScreenBean);
        detailScreenCard.ˊ(arrayList);
        linearLayout.addView(ˊ);
    }

    protected void ॱ(ViewGroup viewGroup) {
        super.ॱ(viewGroup);
        this.ˋ.setEnabled(false);
    }
}
